package com.ruoyi.xh.service.impl;

import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.transaction.annotation.Transactional;
import com.ruoyi.xh.mapper.XhAdminPicTypeMapper;
import com.ruoyi.xh.domain.XhAdminPicType;
import com.ruoyi.xh.service.IXhAdminPicTypeService;

/**
 * 备份Service业务层处理
 * 
 * @author songjw
 * @date 2024-12-13
 */
@Service
public class XhAdminPicTypeServiceImpl extends ServiceImpl<XhAdminPicTypeMapper,XhAdminPicType> implements IXhAdminPicTypeService {

    /**
     * 查询备份
     * 
     * @param id 备份主键
     * @return 备份
     */
    @Override
    public XhAdminPicType selectXhAdminPicTypeById(Long id)
    {
        return this.getById(id);
    }

    /**
     * 查询备份列表
     * 
     * @param xhAdminPicType 备份
     * @return 备份
     */
    @Override
    public Page<XhAdminPicType> selectXhAdminPicTypeList(XhAdminPicType xhAdminPicType)
    {
        return new Page<>();
    }

    /**
     * 新增备份
     * 
     * @param xhAdminPicType 备份
     *
     */
    @Override
    public void insertXhAdminPicType(XhAdminPicType xhAdminPicType)
    {
        this.save(xhAdminPicType);
    }

    /**
     * 修改备份
     * 
     * @param xhAdminPicType 备份
     *
     */
    @Override
    public void updateXhAdminPicType(XhAdminPicType xhAdminPicType)
    {
        this.updateById(xhAdminPicType);
    }

    /**
     * 批量删除备份
     * 
     * @param ids 需要删除的备份主键
     *
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void deleteXhAdminPicTypeByIds(Long[] ids)
    {
        this.removeByIds(Stream.of(ids).collect(Collectors.toSet()));
    }
}
